package com.liws.helloeasyexcel.service.impl;

import com.liws.helloeasyexcel.model.Student;
import com.liws.helloeasyexcel.service.StudentService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: liweisheng
 * @Dcscription:
 * @Date: 2021/12/9 13:37
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Override
    public List<Student> queryStudents() {
        return getData();
    }

    public List<Student> getData() {
        List<Student> lists = new ArrayList<>();
        for(int i = 0; i <= 10; i++) {
            Student student = new Student();
            student.setId(i + 1);
            student.setName("李四" + i);
            student.setBirthday(new Date());
            student.setSalary(1500.00D);
            lists.add(student);
        }
        return lists;
    }
}
